#!/usr/bin/env python
# _*_ coding: utf-8 _*_
# @Time : 2021/7/19 16:28
# @Author : 杨登贤
# @Version：V 0.1
# @File : ReadShapeFile.py
# @desc :

import shapefile
import logger

class ReadShapeFile():

    def __init__(self, directory):
        self.directory = directory

    def readShpFile(self, filepath):
        sp = None
        try:
            sp = shapefile.Reader(filepath)
        except Exception as e:
            logger.error(e)
        return sp

    def readPrjFile(self, filepath):
        prj = None
        try:
            prj = shapefile.Reader(filepath)
        except Exception as e:
            logger.error(e)
        return prj

if __name__ == '__main__':
    readShapeFile = ReadShapeFile("E:\\GIS平台化\\储量矿权\\2000坐标的shp");
    prj = readShapeFile.readPrjFile("{}\\{}".format(readShapeFile.directory,"4-图框-Point.prj"))
    prj